

#include <QApplication>
#include <QDebug>
#include "../qdock.h"
#include "../dockwidget.h"
#include "../layoutmanager.h"
#include "qdocksample.h"

#include "defaultwindowfinder.h"
#include <iostream>
#include "../basedock.h"



int main(int argc, char** argv) {
    QApplication a(argc, argv);

    initDM();

    UDock::Point pt(0,0);
    std::unordered_set<Window> empty;
    qDebug() << UDock::DefaultWindowFinder::getDefaultWindowFinder()
                ->windowFromPoint(pt,empty);
    QBaseDock* bd = new QBaseDock();
    bd->setMinimumSize(400,300);
    bd->show();
//    bd->showBaseIndicators((DockOption)(DockOption::CROSS | DockOption::Tabbed));
//    bd->hideBasePreviews();

//    auto li = new QLeftIndicator(0);
//    li->show();

    UDockWidget* dockwidget1 = new UDockWidget();
    UDockWidget* dockwidget2 = new UDockWidget();
    UDockWidget* dockwidget3 = new UDockWidget();
    UDockWidget* dockwidget4 = new UDockWidget();
    dockwidget1->setWindowTitle(QString("stuff"));
    WindowMover* wm = new WindowMover();
    wm->addWidget(dockwidget1);
    wm->addWidget(dockwidget2);
    wm->addWidget(dockwidget3);
    wm->addWidget(dockwidget4);
    dm->layoutManager()->addToplevelDock(bd);
    dm->layoutManager()->dock(dockwidget2,bd,DockOption::Left);
    dm->layoutManager()->dock(dockwidget3,bd,DockOption::Top);
    dm->layoutManager()->dock(dockwidget4,dockwidget3,DockOption::Tabbed);
    dm->layoutManager()->dock(dockwidget1,dockwidget4,DockOption::Right);


    dockwidget1->show();
    return a.exec();
}
